package him.serviceimple;



import him.dao.BoardUserManager;
import him.daoimple.BoardUserManagerImp;
import him.dto.bbs.BoardUserDto;
import him.service.BoardUserService;

import java.util.List;



public class BoardUserServiceImp implements BoardUserService {
	
	private static BoardUserServiceImp service;
	private BoardUserManager manager;
	
	
	
	
	private BoardUserServiceImp() {
		init();
	}

	
	private void init() {
		manager=new BoardUserManagerImp(); 
	}
	
	public static BoardUserServiceImp getInstance(){
		if(service==null){
			service=new BoardUserServiceImp();
		}
		return service;
	}
			
			
	


	@Override
	public int addBoardUser(BoardUserDto uDto) {
		// TODO Auto-generated method stub
		return manager.addBoardUser(uDto);
	}

	@Override
	public List<BoardUserDto> getAllUsers() {
		// TODO Auto-generated method stub
		return manager.getAllUsers();
	}

	@Override
	public BoardUserDto getUser(String id) {
		// TODO Auto-generated method stub
		return manager.getUser(id);
	}

	@Override
	public int gooutBoardUser(BoardUserDto uDto) {
		// TODO Auto-generated method stub
		return manager.gooutBoardUser(uDto);
	}

	@Override
	public BoardUserDto login(BoardUserDto uDto) {
		// TODO Auto-generated method stub
		return manager.login(uDto);
	}

	@Override
	public int updateAuth(BoardUserDto auDto) {
		// TODO Auto-generated method stub
		return manager.updateAuth(auDto);
	}

	@Override
	public int updateBoardUser(BoardUserDto uDto, String newpassword) {
		// TODO Auto-generated method stub
		return manager.updateBoardUser(uDto, newpassword);
	}

}
